<template>
  <div id="transferDiv">
    <el-transfer
        v-model="$props.values"
        filterable
        filter-placeholder="搜索"
        :titles="['源列表', '目标列表']"
        :data="data"
        @change="handleChange"
    />
  </div>
</template>
<script setup>
import { ref,  watch} from 'vue'
  const emit = defineEmits(['update:values'])
  const values = ref([])
const handleChange = (value, diretion, moveKeys) => {
    emit('update:values', value)
  }
  const props = defineProps({
    values: Array,
    data: Array
  });
</script>

<style lang="scss" scoped>
#transferDiv{
  ::v-deep(.el-transfer){
    text-align:center;
  }
}
</style>
